package com.winway.boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.winway.boot.model.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 系统角色Mapper接口
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {


//    @Select("select r.* from sys_role r left join sys_user_role ur on ur.role_id=r.role_id left join sys_user u on u.user_id = ur.user_id " +
//            "where u.user_name = #{username} and u.status = 0 and  u.del_flag = 0")
    List<SysRole> getRolesByUser(@Param("username") String username);
}
